package com.xj.demo.gcdemo;

public class LocalVarGC {
    public static void main(String[] args) {
        LocalVarGC localVarGC = new LocalVarGC();
        localVarGC.localVarGc2();
    }
    public void localVarGc1() {
        {
            byte[] b = new byte[1024 * 1024 * 10];
        }
        System.gc();
    }
    public void localVarGc2() {
        {
            byte[] b = new byte[1024 * 1024 * 10];
        }
        int a = 0;
        System.gc();
    }
}
